From: Alexander Mikhaylenko Date: Fri, 10 Jan 2020 20:58:24 +0000 (+0500) Subject: workspacesView: Round workspace position X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~223 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b21c8c1290247e869a34427fb08927e5f2af0b6d;p=gnome-shell.git workspacesView: Round workspace position Prevent blurring when scrolling workspaces by aligning it to pixel grid, and be consistent with app grid. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/930 --- diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index 975dd0760..2dd1ae490 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -314,7 +314,7 @@ class WorkspacesView extends WorkspacesViewBase { let workspacesHeight = lastWorkspaceY - firstWorkspaceY; let currentY = firstWorkspaceY; - let newY = -adj.value / (adj.upper - 1) * workspacesHeight; + let newY = -Math.round(adj.value / (adj.upper - 1) * workspacesHeight); let dy = newY - currentY; @@ -328,7 +328,7 @@ class WorkspacesView extends WorkspacesViewBase { let workspacesWidth = lastWorkspaceX - firstWorkspaceX; let currentX = firstWorkspaceX; - let newX = -adj.value / (adj.upper - 1) * workspacesWidth; + let newX = -Math.round(adj.value / (adj.upper - 1) * workspacesWidth); let dx = newX - currentX;